﻿using System;

namespace Effects.GUI
{
    /// <summary>
    ///  Interface that provides playing audio files. 
    /// </summary>
    /// <remarks>
    ///  Implementations of this interface provides playing audio files. (They make user hear something) Different aproaches and drivers can be used by implementing this interface.
    ///  (e. g. playing files using DirectSound, or ASIO drivers,...)
    /// </remarks>
    public interface AudioPlayer
    {
        /// <summary>
        ///  Gets or sets current play position.
        /// </summary>
        int PlayPosition
        {
            get;
            set;
        }

        /// <summary>
        ///  Gets length of wave being played
        /// </summary>
        /// <returns> Length of wave being played </returns>
        int GetWaveLength();

        /// <summary>
        ///  Starts playback
        /// </summary>
        void Play();
        
        /// <summary>
        /// Pauses the playback
        /// </summary>
        void Pause();

        
        /// <summary>
        ///  Stops the playback
        /// </summary>
        void Stop();

        /// <summary>
        ///  Event that is raised when AudiPlayer reaches end of file.
        /// </summary>
        event EventHandler EndOfFile;
    }
}